﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using sg.edu.nus.iss.prettyfaces.DataAccessLayer;

namespace sg.edu.nus.iss.prettyfaces.BusinessLogicLayer
{
    public class ModelManager
    {
        ModelRepository modelRepo = new ModelRepository();

        public PrettyModel viewModelProfile(Guid id)
        {
            return modelRepo.ViewModelProfile(id);
        }
        public IEnumerable<PrettyModel> getAllModels()
        {
            return modelRepo.getAllModels();
        }
        public IEnumerable<Message> getMessageById(Guid id)
        {
            return modelRepo.getMessageById(id);
        }
        public Message getDetailMsssessageById(Guid id) 
        {
            return modelRepo.getDetailMessageById(id);
        }
        public void createNewMessage(Message msg)
        {
            modelRepo.createNewMessage(msg);
        }
        public IEnumerable<Relationship> getRequestById(Guid id)
        {
            return modelRepo.getRequestById(id);
        }
        public Relationship getSingleRequestById(Guid id)
        {
            return modelRepo.getSingleRequestById(id);
        }
        public IEnumerable<aspnet_Users> getAllUsers()
        {
            return modelRepo.getAllUsers();
        }
        public virtual string getUserNameById(Guid id)
        {
            return modelRepo.getUserNameById(id);
        }
        public virtual Boolean UpdateStatus(Guid id, int status)
        {
            return modelRepo.UpdateStatus(id, status);
        }
        public virtual Relationship getRelationshipById(Guid id)
        {
            return modelRepo.getRelationshipById(id);
        }
        public virtual IEnumerable<Relationship> getRequestByPId(Guid id)
        {
            return modelRepo.getRequestByPId(id);
        }
        public void Save()
        {
            modelRepo.Save();
        }
    }
}
